package org.luxor.digital.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.luxor.commons.core.utils.BeanUtils;
import org.luxor.digital.entity.SysConfigEntity;
import org.luxor.digital.mapper.SysConfigMapper;
import org.luxor.digital.service.ISysConfigService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 系统配置信息表
 *
 * @author Mark @date 2020-07-26 14:19:09
 */
@Service("sysConfigService")
public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfigEntity> implements ISysConfigService {

    @Override
    public IPage<SysConfigEntity> page(IPage<SysConfigEntity> page, Map search) {
        SysConfigEntity query = BeanUtils.toObject(SysConfigEntity.class, search);
        return super.page(page, Wrappers.query(query));
    }
}
